package Chapter2.Comparing.c8;

import java.io.FileNotFoundException;
import java.io.PrintStream;

public class StandardIO {
    public static void main(String[] args) {
        try{
            PrintStream ps = new PrintStream("Doc/a.txt");
            PrintStream sout = System.out;
            System.setOut(ps);
            System.out.println("你好");
            System.out.println("哈");
            ps.close();
            System.setOut(sout);
            System.out.println("=====");
        }
        /*catch () {

        }*/
        catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
